---
import { version } from "../../package.json";

const isNotHomepage = Astro.locals.starlightRoute.id !== "";
---

{
    isNotHomepage ? (
        <div />
    ) : (
        <footer class="w-full grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-y-8 gap-x-12 p-12 mt-12 border-t border-t-gray-200 dark:border-t-gray-800">
            <div class="col-span-2 md:col-span-1">
                <svg
                    width="212"
                    height="64"
                    viewBox="0 0 212 64"
                    fill="none"
                    xmlns="http://www.w3.org/2000/svg"
                >
                    <path
                        class="fill-primary dark:fill-white"
                        d="M69.684 26.1H74.832L76.668 33.732L77.964 39.492H78.108L79.62 33.732L81.78 26.1H86.64L88.836 33.732L90.384 39.492H90.528L91.824 33.732L93.66 26.1H98.592L93.372 45H87.792L85.488 37.008L84.156 32.112H84.048L82.752 37.008L80.448 45H74.976L69.684 26.1ZM112.349 45C111.389 45 110.585 44.7 109.937 44.1C109.313 43.5 108.917 42.696 108.749 41.688H108.533C108.245 42.912 107.609 43.848 106.625 44.496C105.641 45.12 104.429 45.432 102.989 45.432C101.093 45.432 99.6413 44.928 98.6333 43.92C97.6253 42.912 97.1213 41.58 97.1213 39.924C97.1213 37.932 97.8413 36.456 99.2813 35.496C100.745 34.512 102.725 34.02 105.221 34.02H108.209V32.832C108.209 31.92 107.969 31.2 107.489 30.672C107.009 30.12 106.205 29.844 105.077 29.844C104.021 29.844 103.181 30.072 102.557 30.528C101.933 30.984 101.417 31.5 101.009 32.076L97.8413 29.268C98.6093 28.14 99.5693 27.264 100.721 26.64C101.897 25.992 103.481 25.668 105.473 25.668C108.161 25.668 110.177 26.256 111.521 27.432C112.865 28.608 113.537 30.324 113.537 32.58V40.86H115.301V45H112.349ZM104.969 41.724C105.857 41.724 106.613 41.532 107.237 41.148C107.885 40.764 108.209 40.14 108.209 39.276V37.044H105.617C103.529 37.044 102.485 37.752 102.485 39.168V39.708C102.485 40.404 102.701 40.92 103.133 41.256C103.565 41.568 104.177 41.724 104.969 41.724ZM115.997 45V26.1H121.325V29.304H121.541C121.877 28.32 122.465 27.468 123.305 26.748C124.145 26.028 125.309 25.668 126.797 25.668C128.741 25.668 130.205 26.316 131.189 27.612C132.197 28.908 132.701 30.756 132.701 33.156V45H127.373V33.588C127.373 32.364 127.181 31.464 126.797 30.888C126.413 30.288 125.729 29.988 124.745 29.988C124.313 29.988 123.893 30.048 123.485 30.168C123.077 30.264 122.705 30.432 122.369 30.672C122.057 30.912 121.805 31.212 121.613 31.572C121.421 31.908 121.325 32.304 121.325 32.76V45H115.997ZM146.155 41.832H145.975C145.831 42.336 145.603 42.816 145.291 43.272C144.979 43.704 144.595 44.088 144.139 44.424C143.707 44.736 143.203 44.976 142.627 45.144C142.075 45.336 141.499 45.432 140.899 45.432C138.499 45.432 136.687 44.592 135.463 42.912C134.239 41.208 133.627 38.748 133.627 35.532C133.627 32.316 134.239 29.868 135.463 28.188C136.687 26.508 138.499 25.668 140.899 25.668C142.123 25.668 143.203 26.004 144.139 26.676C145.099 27.348 145.711 28.212 145.975 29.268H146.155V18.36H151.483V45H146.155V41.832ZM142.663 41.112C143.671 41.112 144.499 40.872 145.147 40.392C145.819 39.888 146.155 39.204 146.155 38.34V32.76C146.155 31.896 145.819 31.224 145.147 30.744C144.499 30.24 143.671 29.988 142.663 29.988C141.655 29.988 140.815 30.348 140.143 31.068C139.495 31.764 139.171 32.712 139.171 33.912V37.188C139.171 38.388 139.495 39.348 140.143 40.068C140.815 40.764 141.655 41.112 142.663 41.112ZM161.469 45.432C160.029 45.432 158.745 45.204 157.617 44.748C156.489 44.268 155.529 43.608 154.737 42.768C153.969 41.904 153.381 40.86 152.973 39.636C152.589 38.412 152.397 37.044 152.397 35.532C152.397 34.044 152.589 32.7 152.973 31.5C153.357 30.276 153.921 29.232 154.665 28.368C155.433 27.504 156.369 26.844 157.473 26.388C158.577 25.908 159.837 25.668 161.253 25.668C162.813 25.668 164.145 25.932 165.249 26.46C166.377 26.988 167.289 27.696 167.985 28.584C168.705 29.472 169.221 30.504 169.533 31.68C169.869 32.832 170.037 34.044 170.037 35.316V36.9H157.905V37.188C157.905 38.436 158.241 39.432 158.913 40.176C159.585 40.896 160.641 41.256 162.081 41.256C163.185 41.256 164.085 41.04 164.781 40.608C165.477 40.152 166.125 39.612 166.725 38.988L169.389 42.3C168.549 43.284 167.445 44.052 166.077 44.604C164.733 45.156 163.197 45.432 161.469 45.432ZM161.361 29.592C160.281 29.592 159.429 29.952 158.805 30.672C158.205 31.368 157.905 32.304 157.905 33.48V33.768H164.529V33.444C164.529 32.292 164.265 31.368 163.737 30.672C163.233 29.952 162.441 29.592 161.361 29.592ZM170.92 45V26.1H176.248V30.204H176.428C176.524 29.676 176.692 29.172 176.932 28.692C177.172 28.188 177.484 27.744 177.868 27.36C178.276 26.976 178.756 26.676 179.308 26.46C179.86 26.22 180.508 26.1 181.252 26.1H182.188V31.068H180.856C179.296 31.068 178.132 31.272 177.364 31.68C176.62 32.088 176.248 32.844 176.248 33.948V45H170.92ZM190.303 45.432C188.863 45.432 187.579 45.204 186.451 44.748C185.323 44.268 184.363 43.608 183.571 42.768C182.803 41.904 182.215 40.86 181.807 39.636C181.423 38.412 181.231 37.044 181.231 35.532C181.231 34.044 181.423 32.7 181.807 31.5C182.191 30.276 182.755 29.232 183.499 28.368C184.267 27.504 185.203 26.844 186.307 26.388C187.411 25.908 188.671 25.668 190.087 25.668C191.647 25.668 192.979 25.932 194.083 26.46C195.211 26.988 196.123 27.696 196.819 28.584C197.539 29.472 198.055 30.504 198.367 31.68C198.703 32.832 198.871 34.044 198.871 35.316V36.9H186.739V37.188C186.739 38.436 187.075 39.432 187.747 40.176C188.419 40.896 189.475 41.256 190.915 41.256C192.019 41.256 192.919 41.04 193.615 40.608C194.311 40.152 194.959 39.612 195.559 38.988L198.223 42.3C197.383 43.284 196.279 44.052 194.911 44.604C193.567 45.156 192.031 45.432 190.303 45.432ZM190.195 29.592C189.115 29.592 188.263 29.952 187.639 30.672C187.039 31.368 186.739 32.304 186.739 33.48V33.768H193.363V33.444C193.363 32.292 193.099 31.368 192.571 30.672C192.067 29.952 191.275 29.592 190.195 29.592ZM199.754 45V26.1H205.082V30.204H205.262C205.358 29.676 205.526 29.172 205.766 28.692C206.006 28.188 206.318 27.744 206.702 27.36C207.11 26.976 207.59 26.676 208.142 26.46C208.694 26.22 209.342 26.1 210.086 26.1H211.022V31.068H209.69C208.13 31.068 206.966 31.272 206.198 31.68C205.454 32.088 205.082 32.844 205.082 33.948V45H199.754Z"
                    />
                    <path
                        class="fill-primary dark:fill-white"
                        fill-rule="evenodd"
                        clip-rule="evenodd"
                        d="M35.2743 63.8345C51.4093 62.1947 64 48.5677 64 32C64 14.3269 49.6731 0 32 0C14.3269 0 0 14.3269 0 32C0 44.0405 6.64987 54.5278 16.4773 59.9896C22.5923 58.0064 28.3994 55.4479 29.6875 52.625C30.5376 50.7621 29.1608 48.8752 27.932 47.191C27.1213 46.0799 26.375 45.057 26.375 44.1875C26.375 40.0712 37.5625 38.75 37.5625 38.75H41.4375C41.4375 38.75 31.0625 40.0625 31.5625 44.1875C31.73 45.5696 32.8401 46.6758 34.101 47.9323C35.3717 49.1985 36.7955 50.6173 37.5625 52.625C39.4096 57.4601 36.1566 62.5786 35.2743 63.8345Z"
                    />
                    <path
                        d="M43.5265 25.7518C43.734 25.4161 44.2526 25.4161 44.4601 25.7518L52.0453 38.0259C52.2527 38.3616 51.9934 38.7813 51.5785 38.7813H36.4081C35.9932 38.7813 35.7338 38.3616 35.9413 38.0259L43.5265 25.7518Z"
                        class="fill-white dark:fill-primary"
                    />
                    <path
                        d="M20.5904 22.9095C20.8265 22.5006 21.4168 22.5006 21.6529 22.9095L30.2852 37.8612C30.5213 38.2701 30.2262 38.7813 29.754 38.7813H12.4893C12.0171 38.7813 11.722 38.2701 11.9581 37.8612L20.5904 22.9095Z"
                        class="fill-white dark:fill-primary"
                    />
                    <path
                        d="M33.2813 19.375C33.57 18.875 34.2916 18.875 34.5803 19.375L45.135 37.6562C45.4237 38.1562 45.0628 38.7812 44.4855 38.7812H23.3761C22.7988 38.7812 22.4379 38.1562 22.7266 37.6562L33.2813 19.375Z"
                        class="fill-white dark:fill-primary"
                    />
                    <path
                        d="M18.5517 14.4248C17.4786 14.4248 16.6088 15.7599 16.6088 17.4069H20.4946C20.4946 15.7599 19.6247 14.4248 18.5517 14.4248Z"
                        class="fill-white dark:fill-primary"
                    />
                    <path
                        d="M15.3888 14.4248C13.5172 14.4248 12 15.7599 12 17.4069H18.7776C18.7776 15.7599 17.2604 14.4248 15.3888 14.4248Z"
                        class="fill-white dark:fill-primary"
                    />
                    <path
                        d="M16.7895 13.25C15.6915 13.25 14.8014 14.4233 14.8014 15.8707H18.7776C18.7776 14.4233 17.8875 13.25 16.7895 13.25Z"
                        class="fill-white dark:fill-primary"
                    />
                    <path
                        d="M34.5 8.375C33.0503 8.375 31.875 9.99797 31.875 12H37.125C37.125 9.99797 35.9497 8.375 34.5 8.375Z"
                        class="fill-white dark:fill-primary"
                    />
                    <path
                        d="M31.25 9.875C29.7312 9.875 28.5 10.8264 28.5 12H34C34 10.8264 32.7688 9.875 31.25 9.875Z"
                        class="fill-white dark:fill-primary"
                    />
                    <path
                        d="M31.875 7.875C30.7014 7.875 29.75 9.05025 29.75 10.5H34C34 9.05025 33.0486 7.875 31.875 7.875Z"
                        class="fill-white dark:fill-primary"
                    />
                    <path
                        d="M49.5625 13.75C48.4924 13.75 47.625 14.8693 47.625 16.25H51.5C51.5 14.8693 50.6326 13.75 49.5625 13.75Z"
                        class="fill-white dark:fill-primary"
                    />
                    <path
                        d="M45.625 13.625C44.1062 13.625 42.875 14.8003 42.875 16.25H48.375C48.375 14.8003 47.1438 13.625 45.625 13.625Z"
                        class="fill-white dark:fill-primary"
                    />
                    <path
                        d="M47.125 12.25C45.5372 12.25 44.25 13.4253 44.25 14.875H50C50 13.4253 48.7128 12.25 47.125 12.25Z"
                        class="fill-white dark:fill-primary"
                    />
                    <path
                        d="M14.1958 52.6452C14.1958 52.4381 14.3637 52.2702 14.5708 52.2702H15.4105C15.6177 52.2702 15.7855 52.4381 15.7855 52.6452V53.22C15.7855 53.4271 15.6177 53.595 15.4105 53.595H14.5708C14.3637 53.595 14.1958 53.4271 14.1958 53.22V52.6452Z"
                        class="fill-white dark:fill-primary"
                    />
                    <path
                        d="M14.6723 49.2875C14.8571 49.1348 15.1243 49.1348 15.3091 49.2875L18.0489 51.5503C18.4103 51.8488 18.1992 52.4358 17.7305 52.4358H12.251C11.7823 52.4358 11.5712 51.8488 11.9326 51.5503L14.6723 49.2875Z"
                        class="fill-white dark:fill-primary"
                    />
                    <path
                        d="M14.6465 47.7616C14.8394 47.5784 15.142 47.5784 15.335 47.7616L17.8149 50.1159C18.1426 50.427 17.9224 50.9785 17.4707 50.9785H12.5108C12.059 50.9785 11.8389 50.427 12.1665 50.1159L14.6465 47.7616Z"
                        class="fill-white dark:fill-primary"
                    />
                    <path
                        d="M14.607 46.3045C14.8069 46.0652 15.1746 46.0652 15.3745 46.3045L17.3759 48.7008C17.6478 49.0263 17.4163 49.5213 16.9921 49.5213H12.9894C12.5652 49.5213 12.3337 49.0263 12.6056 48.7008L14.607 46.3045Z"
                        class="fill-white dark:fill-primary"
                    />
                    <path
                        d="M43.4458 49.6452C43.4458 49.4381 43.6137 49.2702 43.8208 49.2702H44.6605C44.8677 49.2702 45.0355 49.4381 45.0355 49.6452V50.22C45.0355 50.4271 44.8677 50.595 44.6605 50.595H43.8208C43.6137 50.595 43.4458 50.4271 43.4458 50.22V49.6452Z"
                        class="fill-white dark:fill-primary"
                    />
                    <path
                        d="M43.9223 46.2875C44.1071 46.1348 44.3743 46.1348 44.5591 46.2875L47.2989 48.5503C47.6603 48.8488 47.4492 49.4358 46.9805 49.4358H41.501C41.0323 49.4358 40.8212 48.8488 41.1826 48.5503L43.9223 46.2875Z"
                        class="fill-white dark:fill-primary"
                    />
                    <path
                        d="M43.8965 44.7616C44.0894 44.5784 44.392 44.5784 44.585 44.7616L47.0649 47.1159C47.3926 47.427 47.1724 47.9785 46.7207 47.9785H41.7608C41.309 47.9785 41.0889 47.427 41.4165 47.1159L43.8965 44.7616Z"
                        class="fill-white dark:fill-primary"
                    />
                    <path
                        d="M43.857 43.3045C44.0569 43.0652 44.4246 43.0652 44.6245 43.3045L46.6259 45.7008C46.8978 46.0263 46.6663 46.5213 46.2421 46.5213H42.2394C41.8152 46.5213 41.5837 46.0263 41.8556 45.7008L43.857 43.3045Z"
                        class="fill-white dark:fill-primary"
                    />
                    <text
                        x="170"
                        y="64"
                        class="fill-primary dark:fill-white"
                        font-size="0.75rem"
                    >
                        v{version}
                    </text>
                </svg>
            </div>
            <div>
                <h5 class="font-semibold">Resources</h5>
                <ul class="mt-4 text-sm">
                    <li>
                        <a href="https://demo.wanderer.to">Demo</a>
                    </li>
                    <li>
                        <a href="/api-reference">API Reference</a>
                    </li>
                    <li>
                        <a href="https://pocketbase.io/">PocketBase</a>
                    </li>
                    <li>
                        <a href="https://www.meilisearch.com/">meilisearch</a>
                    </li>
                </ul>
            </div>
            <div>
                <h5 class="font-semibold">wanderer</h5>
                <ul class="mt-4 text-sm">
                    <li>
                        <a href="/">About</a>
                    </li>
                    <li>
                        <a href="#features">Features</a>
                    </li>
                    <li>
                        <a href="/changelog/">Changelog</a>
                    </li>
                    <li>
                        <a href="https://github.com/Flomp/wanderer/blob/main/LICENSE">
                            License
                        </a>
                    </li>
                </ul>
            </div>
            <div>
                <h5 class="font-semibold">Community</h5>
                <ul class="mt-4 text-sm">
                    <li>
                        <a href="https://github.com/Flomp/wanderer">GitHub</a>
                    </li>
                    <li>
                        <a href="https://github.com/Flomp/wanderer/issues">
                            Issues
                        </a>
                    </li>
                    <li>
                        <a href="https://github.com/Flomp/wanderer/pulls">
                            Contribute
                        </a>
                    </li>
                    <li>
                        <a href="https://discord.gg/USSEBY98CP">Discord</a>
                    </li>
                </ul>
            </div>
        </footer>
    )
}

<style>
    footer li:not(:last-child) {
        margin-bottom: 4px;
    }

    footer a {
        text-decoration: none;
        color: var(--sl-color-text);
    }
    footer ul {
        list-style-type: none !important;
        padding: 0;
    }
</style>
